 package com.banksoft.cps.bean.common;


 public class ServiceException extends Exception
{
    private ErrorTip errorTip;

    public ServiceException(ErrorTip errorTip){
        this.errorTip = errorTip;
    }

    public ServiceException(int code, String msg){
        this(null);
        ErrorTip errorTip = new ErrorTip(code,msg);
        this.errorTip = errorTip;
    }

    public ErrorTip getErrorTip() {
        return this.errorTip;
    }

    public String toString()
    {
        return "ServiceException{errorCode=" + this.errorTip.getCode() + " errorMsg:" + this.errorTip.getMsg() + '}';
    }
}
